module.exports = async (req, res) => {
  if (
    req.session &&
    req.session.userInfo &&
    req.session.userInfo.role == "admin"
  ) {
    const s = `var isLogin = true; var userId=\"${req.session.userInfo._id}\"`;
    res.send({ isLogin: true, userId: req.session.userInfo._id });
  } else {
    // res.send('var isLogin = false')
    res.send({ isLogin: false, userId: null });
  }
};
